﻿

@{
    ViewBag.Title = "Editor";
    Layout = "";
}
<html>
<body>
    @using (Html.BeginForm())
    { 
        <div>
            <div>
               
                <script type="text/javascript">
                    var ipts = document.getElementsByName("SelectType");
                    var mode = '@ViewBag._mode' || "";
                    if (mode) {
                        for (var i = 0; i < ipts.length; i++) {
                            if (ipts[i].value == mode) {
                                ipts[i].checked = true;
                                break;
                            }
                        }
                    }
                    function MvcSubmit() {
                        document.getElementById('btn_sumbit').click();
                    }
                    var editor;
                    function RichTextEditor_OnLoad(rteeditor) {

                        var c = rteeditor.GetText();
                       
                        if (!c) {
                            document.getElementById("result").innerHTML = "";
                            return;
                        }
                        document.getElementById("result").innerHTML = c.replace(/</g, "&lt;");
                    }



                </script>
            </div>
            <br />

            @Html.Raw(ViewBag.Editor)
          
        </div>
     
 
    }
</body>
</html>

